﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

namespace ZY.EntityFrameWork.Core.Model.Entity.Authority
{
    /// <summary>
    /// 记录功能模块的信息
    /// </summary>
    public class Module : BaseEntity
    {
        public Module()
        {
            ChildModule = new Collection<Module>();
        }

        /// <summary>
        /// 模块标记
        /// </summary>
        public string ModuleTag { get; set; }

        /// <summary>
        /// 模块名称
        /// </summary>
        public string ModuleName { get; set; }
        
        /// <summary>
        /// 使用权限
        /// </summary>
        //public bool IsRight { get; set; }
        public bool Enabled { get; set; }

        /// <summary>
        /// 模块的实际权限
        /// </summary>
        public int Permissions { get; set; }

        public virtual Module ParentModule { get; set; }
        public virtual ICollection<Module> ChildModule { get; set; }
        public virtual ICollection<RoleModule> RoleModules { get; set; }

        //public virtual ICollection<Operation> Operations { get; set; }
    }
}
